<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks>
    <Nullable>enable</Nullable>
    <NoWarn>$(NoWarn),CA1050,CA1850</NoWarn>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Compile Include="..\Common\IsExternalInit.cs" />
    <Compile Include="$(RepoRoot)src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\NullableAttributes.cs" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\Common\Utils.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
  </ItemGroup>

  <Target Name="GetFilesToPackage" Returns="@(FilesToPackage)">
    <ItemGroup>
      <!-- non-net4* -->
      <FilesToPackage Include="$(OutputPath)$(NetCoreAppToolCurrent)\$(MSBuildProjectName)*"
                      TargetPath="tasks\$(NetCoreAppToolCurrent)" />

      <!-- for net472 we need all the dependent assemblies too, so copy from the publish folder -->
      <FilesToPackage Include="$(OutputPath)$(NetFrameworkToolCurrent)\*"
                      TargetPath="tasks\$(NetFrameworkToolCurrent)" />
    </ItemGroup>
  </Target>
</Project>